<?php
function showRatingStar($totalVote, $votePoint)
{
	$rating = 0;
	if ($totalVote > 0)
	{
		$rating = $votePoint / $totalVote;
	}
	
	for ($i=1; $i<=5; $i++)
	{
		if ($rating < $i)
		{
			echo'<img class="star0" src="http://s.ytimg.com/yt/img/pixel-vfl73.gif" />';
		}
	    else
	    {
	    	echo '<img class="star1" src="http://s.ytimg.com/yt/img/pixel-vfl73.gif" />';
	    }                      
	}
}
?>